<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="<%=basePath%>js/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/vue.min.js"></script>
<link rel="stylesheet" href="<%=basePath%>css/layui/css/layui.css">
<script type="text/javascript"
	src="<%=basePath%>js/stockManage/showExameList.js"></script>
<script type="text/javascript" src="<%=basePath%>js/BaseUtile.js"></script>
</head>
<body style="margin: 3%">

	<!-- 流程进度 -->
	<div>
		<div style="float: left">

			<label>流程进度：</label>
		</div>
		<div style="float: left">

			<label>制定生产计划</label>
		</div>
		<div style="">

			<label>审核</label>
		</div>
	</div>
	<hr class="layui-bg-orange">
	<!-- 显示采购订单 -->
	<div style="margin-top: 2%; margin-left: 3%">

		<!-- 左边 -->
		<div style="float: left">
			<div>
				<label>供货商：</label> <label>${purchaseOrder.supplier.nickname}</label>
			</div>

			<div>
				<label>采购时间：</label> <label>${purchaseOrder.purchaseTime}</label>
			</div>

			<div>
				<label>应付账款：</label> <label>${purchaseOrder.totalPrice}</label>
			</div>

			<c:if test="${purchaseOrder.state<=1}">
				<div style="margin-top: 1%; margin-bottom: 2%">
					<label>创建人：</label> <label>${purchaseOrder.createBy.nickname}</label>
				</div>
				<div>
					<label>创建时间：</label> <label>${purchaseOrder.createTime}</label>
				</div>
			</c:if>

			<c:if test="${purchaseOrder.state>1}">
				<div style="margin-top: 1%; margin-bottom: 2%">
					<label>创建人：</label> <label>${purchaseOrder.createBy.nickname}</label>
				</div>
				<div>
					<label>创建时间：</label> <label>${purchaseOrder.createTime}</label>
				</div>
				<div style="margin-top: 1%; margin-bottom: 2%">
					<label>审核人：</label> <label>${purchaseOrder.exameBy.nickname}</label>
				</div>
				<div>
					<label>审核时间：</label> <label>${purchaseOrder.exameTime}</label>
				</div>
			</c:if>



		</div>

		<!-- 右边 -->
		<div style="float: left; margin-left: 30%">
				<c:if test="${purchaseOrder.state==1}">
					<label style="font-size: 30px; color: red">未审核</label>
				</c:if>
				<c:if test="${purchaseOrder.state==2}">
					<label style="font-size: 30px; color: red">审核通过</label>
				</c:if>
				<c:if test="${purchaseOrder.state==3}">
					<label style="font-size: 30px; color: red">审核未通过</label>
				</c:if>
				<c:if test="${purchaseOrder.state==4}">
					<label style="font-size: 30px; color: red">供应商已发货</label>
				</c:if>
				<c:if test="${purchaseOrder.state==5}">
					<label style="font-size: 30px; color: red">供应商拒绝发货</label>
				</c:if>
				<c:if test="${purchaseOrder.state==6}">
					<label style="font-size: 30px; color: red">采购员已收货</label>
				</c:if>
				<c:if test="${purchaseOrder.state==7}">
					<label style="font-size: 30px; color: red">采购员拒绝收货</label>
				</c:if>
		</div>
	</div>

	<hr class="layui-bg-orange">

	<div id="">
		<table class="layui-table">
			<thead>
				<tr>
					<th>序号</th>
					<th>名称</th>
					<th>数量</th>
					<th>单位</th>
					<th>单价</th>
					<th>总价</th>
				</tr>
			</thead>
			<c:set var="num" value="1"></c:set>
			<c:forEach var="list" items="${purchaseOrderMaterialList}">
				<tr>
					<th>${num}</th>
					<c:set var="num" value="${num+1}"></c:set>
					<th>${list.material.materialName}</th>
					<th>${list.materialQuantity}</th>
					<th>${list.material.unit.unitName}</th>
					<th>${list.material.materialPrice}</th>
					<th>${list.totalPrice}</th>
				</tr>
			</c:forEach>
		</table>
	</div>



	<hr class="layui-bg-orange">
	<div>
		<label class="layui-form-label">备注:</label>
		<textarea disabled="disabled" class="layui-textarea">${purchaseOrder.remark}</textarea>
	</div>
	<hr class="layui-bg-orange">


	<c:if test="${remark=='exame'}">
		<div>
			<label class="layui-form-label">审核意见:</label>
			<textarea id="inputExameSuggestion" class="layui-textarea"
				placeholder="请输入审核意见"></textarea>
		</div>
	</c:if>



	<c:if test="${purchaseOrder.state>1}">
		<div>
			<label class="layui-form-label">审核意见:</label>
			<textarea class="layui-textarea" disabled="disabled">${purchaseOrder.exameSuggestion}</textarea>
		</div>
	</c:if>
	</div>












	<script type="text/javascript" src="<%=basePath%>css/layui/layui.js"></script>
	<script>
		layui.use('form', function() {

		});
	</script>
</body>
</html>